<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title>鼠标移除移入效果</title>
        <style>
        	div{
        		width: 200px;
        		height: 200px;
        		
        	}
        </style>
	</head>
	<body>
		<ul>
			<li>what is javascript</li>
		</ul>
		<p><input type="checkbox" /> 两周内自动登录</p>
	
	<div id="a" onmouseover="over()" onmouseleave="leave()">
		<p id="b" >为了你的信息安全</p>
		<p id="c" style="color: #FFFFFF;">这是另外的内容</p>
	</div>
	
	  <script>
	  	var div=document.getElementById('a');
	  	var a=document.getElementById('b');
	  	var b=document.getElementById('c');
	  	function over(){
	  		
	  		div.style.background='gainsboro';
	  		c.style.color='gray';
	  	}
	  	function leave(){
	  		div.style.background='';
	        c.style.color='#FFFFFF';
	  	}
	  </script>
	</body>
</html>
